
if-shell 'test "$(uname -s)" = Darwin' 'set -g default-command "reattach-to-user-namespace -l $SHELL"'

# --- mac 剪切板支持 ---
# 使系统的 pbcopy/pbpaste 能响应 tmux 内的 copy/paste# 为 mac 打剪切板补丁，
# 需要 `brew install reattach-to-user-namespace`

# copy to Mac OSX clipboard
#if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
# copy to X11 clipboard
#if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"'
#if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"'
# copy to Windows clipboard
#if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"'
#if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"'
